namespace CSharpPro;

public class Shuchu
{
    int main() {
        int num, hundreds, tens, units;
    
        Console.WriteLine("1000以内的水仙花数有：\n");
        
        for (num = 100; num < 1000; num++) {
            hundreds = num / 100;          
            tens = (num / 10) % 10;        
            units = num % 10;              
            
            if (num == hundreds * hundreds * hundreds + tens * tens * tens + units * units * units) {
                Console.WriteLine("%d ", num);
            }
        }
    
        Console.WriteLine("\n");
        return 0;
    }
}